<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of LoginForm
 *
 * @author Admin
 */
class Application_Form_house_FilesForm extends Zend_Form {

    public function __construct($options = null) {
        parent::__construct($options);
        // setting Form name, Form action and Form Ecryption type

        $this->setName('document');
        $this->setAction('add');
        $this->setAttrib('enctype', 'multipart/form-data');
        
        $name = new Zend_Form_Element_Text('name');
        $name->addFilter('StripTags')
                ->addFilter('StringTrim')
                ->setRequired(true)
                ->setAttrib('class', 'text ui-corner-all')
                ->setDecorators(array('ViewHelper', 'Errors'));

        // creating object for Zend_Form_Element_File
        $doc_file = new Zend_Form_Element_File('doc_path');
        $doc_file->setRequired(true)
                ->setAttrib('class', 'text ui-corner-all');
        $this->addElements(array($name,$doc_file));
    }

}